Winter 2026 Day 4
fork() creates a new child process
init process is ancestor of all processes
pstree in a terminal to seeexec() makes a process execute a given executable (effectively replaces the process)exit() terminates a processwait() causes a parent to block until child terminatesfork()?exec() to change its memory image to a new programfork() then exec())?
exec()Some operating systems do not allow child to exist if its parent has terminated. If a process terminates, then all its children must also be terminated
The parent process may wait for termination of a child process by using the wait() system call. The call returns status information and the pid of the terminated process
wait()), and process completes, process is a zombie
wait(), even if the child exits firstwait(), process is an orphan
init benevolently adopts orphansWhat isn’t clear?
Comments? Thoughts?
View namespaces a process belongs to:
Use unshare to create a new PID namespace:
Compare namespace inodes before and after (same inode = same namespace):
View what cgroup a process belongs to:
Check your current limits:
In practice, cgroups are invisible to users, kernel enforces limits automatically when a process exceeds allocated resources
Docker) combine namespaces + cgroups + layered filesystemsWhat isn’t clear?
Comments? Thoughts?
send() and recv() “Gemini, make an image in the style of a video game pitting pipes versus shared memory”
What isn’t clear?
Comments? Thoughts?